Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

front: unify PathStep and SuggestedOP matching #9289

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

emersion
Copy link
Member

See individual commits.

Ref #9276 (comment)

Depends on #9276

Synar and others added 2 commits October 10, 2024 12:17
In many spots we need to match a PathStep with a SuggestedOP.
Each spot is a special snowflake and needs its own little
variation of the matching logic. formatSuggestedViasToRowVias()
needs to match KP and PathStep.id, but that's undesirable for
other spots.

Extract the extra special matching near the spot it's needed.
In following commits matchPathStepAndOp() will be re-used in more
spots.

No behavior change, only refactoring.

Signed-off-by: Simon Ser <[email protected]>
@emersion emersion requested a review from a team as a code owner October 10, 2024 10:49
@emersion emersion self-assigned this Oct 10, 2024
The logic in matchPathStepAndOp() is more general.

Signed-off-by: Simon Ser <[email protected]>
The logic in matchPathStepAndOp() is more general.
pathStepMatchesOp() performs some special checks on kp/name/opId
so retain these.

Also need to adapt the argument type for matchPathStepAndOp() to
only pick the properties we really need.

Signed-off-by: Simon Ser <[email protected]>
@emersion emersion force-pushed the emr/refacto-pathstep-op-matching branch from f84c3e2 to bf9dc79 Compare October 10, 2024 10:54
Copy link
Contributor

@Synar Synar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, but I left a few naive comments

front/src/modules/pathfinding/utils.ts Show resolved Hide resolved
front/src/modules/pathfinding/utils.ts Show resolved Hide resolved
front/src/modules/timesStops/helpers/utils.ts Show resolved Hide resolved
@Synar Synar self-requested a review October 11, 2024 08:38
@emersion emersion requested review from clarani and removed request for kmer2016 October 11, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants